<?php


namespace app\middleware;


use think\Validate;

class ArticleValidate extends Validate
{
    protected $rule = [
        'title' => 'require|max:100',
        'articleContent' => 'require|max:25',
        'articleTypeId' => 'require|max:25',
        'uid' => 'require|max:25',
    ];

    protected $message = [
        'title.require' => '文章标题是必填的',
        'title.max' => '文章标题最多不能超过100个字符',
        'articleContent' => '文章内容是必填的',
        'articleTypeId' => '文章分类是必选的',
        'uid' => '用户id是必选的',
    ];
}